package com.hundunjiang.ToolsServer.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class MsmConstantUtils implements InitializingBean {
    @Value("${tencentcloudapi.message.SecretId}")
    private String secretID;

    @Value("${tencentcloudapi.message.SecretKey}")
    private String secretKey;

    @Value("${tencentcloudapi.message.AppId}")
    private String appId;

    @Value("${tencentcloudapi.message.SignName}")
    private String signName;

    @Value("${tencentcloudapi.message.RegistCode}")
    private String RegistCode;

    @Value("${tencentcloudapi.message.RegistSuccess}")
    private String RegistSuccess;

    //六个相关的参数
    public static String SECRET_ID;
    public static String SECRET_KEY;
    public static String APP_ID;
    public static String SIGN_NAME;
    public static String RegistCode_ID;
    public static String RegistSuccess_ID;

    @Override
    public void afterPropertiesSet() throws Exception {
        SECRET_ID = secretID;
        SECRET_KEY = secretKey;
        APP_ID = appId;
        SIGN_NAME = signName;
        RegistCode_ID = RegistCode;
        RegistSuccess_ID=RegistSuccess;
    }
}